<form name="<?php echo escapeString($name) ?>" method="<?php echo $method ?>" action="<?php echo $action ?>" <?php foreach ($attributes AS $attributeName=>$attributeValue): echo $attributeName; ?>="<?php echo $attributeValue ?>"<?php endforeach;?>>
    <ul><?php foreach($fields AS $field): ?>
        <li>
            <label <?php if ($field->isError()): ?>class="error"<?php endif; ?> for="<?php echo escapeString($name) ?>_<?php echo $field->getName() ?>"><?php echo $field->getLabel() ?> :<br />
                    <?php if ( $field->isError() ): ?>
                        <span class="helper"><?php echo $field->getError() ?></span><?php
                    else: ?>
                        <span class="helper"><?php if ( $field->isRequired() ): ?><span class="help">Champ requis.</span> <?php endif; ?><?php echo $field->getHelper() ?>&nbsp;</span>
                    <?php endif; ?>
            </label>
                <?php $field->display() ?>
        </li>
        <?php endforeach; ?>
    </ul>
    <hr />
    <div class="submit">
	<?php foreach ($buttons AS $button): ?>
	    <?php $button->display() ?> | <?php
	endforeach; ?>
	<input class="submit" type="submit" name="submit_<?php echo escapeString($name) ?>" value="<?php echo $submitText ?>" />
    </div>
</form>